package cn.lyq.card.ui.setting

import cn.lyq.card.R
import cn.lyq.card.base.BaseActivity
import cn.lyq.card.global.SPKeyGlobal
import cn.lyq.card.ui.login.LoginActivity
import cn.lyq.card.utils.setClick
import com.blankj.utilcode.util.SPUtils
import kotlinx.android.synthetic.main.act_sys_setting.*

class SysSettingActivity : BaseActivity() {

    override fun getLayoutId(): Int {
        return R.layout.act_sys_setting
    }

    override fun initView() {
        super.initView()
        setMyTitle(R.string.str_setting)
    }

    override fun initListener() {
        super.initListener()
        tvUpdateLoginPwd.setClick {
            startActivity(PwdUpdateActivity::class.java)
        }
        tvUpdateCashPwd.setClick {
            startActivity(CashPwdUpdateActivity::class.java)
        }
        tvLogout.setClick {
            SPUtils.getInstance().put(SPKeyGlobal.BASE.TOKEN, "")
            startActivity(LoginActivity::class.java)
            finish()
        }
    }
}